// DlgShowEzdFile.cpp : implementation file
//

#include "stdafx.h"
#include "hglasercutingsoftware.h"
#include "DlgShowEzdFile.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgShowEzdFile dialog


CDlgShowEzdFile::CDlgShowEzdFile(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgShowEzdFile::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgShowEzdFile)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	pEzd = NULL;
	m_Wnd = NULL;
}


void CDlgShowEzdFile::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgShowEzdFile)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgShowEzdFile, CDialog)
	//{{AFX_MSG_MAP(CDlgShowEzdFile)
	ON_WM_PAINT()
	ON_WM_TIMER()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgShowEzdFile message handlers

void CDlgShowEzdFile::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	if ((pEzd != NULL) && (m_Wnd != NULL))
	{
		pEzd->DrawPreview(m_Wnd);
	}
	// Do not call CDialog::OnPaint() for painting messages
}

BOOL CDlgShowEzdFile::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_Wnd = GetDlgItem(IDC_STATIC_SHOWPIC);
	SetTimer(12345,200,NULL);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDlgShowEzdFile::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	if (nIDEvent == 12345)
	{
		if ((pEzd != NULL) && (m_Wnd != NULL))
		{
			pEzd->DrawPreview(m_Wnd);
		}
	}
	CDialog::OnTimer(nIDEvent);
}
